var ngFilterExtensions = angular.module("ngFilterExtensions", []);

/**
*	Gets the input array starting from the specified index
*	@return array the sliced array
*/
ngFilterExtensions.filter("startFrom", function(){
	return function(input, start){
   	return input.slice(parseInt(start,10));
	}
});

/**
*	Checks whether the input string starts with the specified value
*	@return bool true if the input string starts with the value, false otherwise
*/
ngFilterExtensions.filter("startWith", function(){
	return function(input, value){
		return (input.indexOf(value) == 0);
	}
});

/**
*	Checks whether the input string ends with the specified value
*	@return bool true if the input string ends with the value, false otherwise
*/
ngFilterExtensions.filter("endWith", function(){
	return function(input, value){
		var startIndex = input.length - value.length;
		return (input.indexOf(value, startIndex) != -1);
	}
});

ngFilterExtensions.filter("groupBy", ["$parse", function($parse){
	return function(input, groupBy){
	}
}]);